The present invention relates to a computer system, and more particularly to a game computer system dealing with both sound and image data.
Traditionally, in a computer system, sound is produced from waveform data, which is generated by a computer program based process; however, the quality of the sound has been low. For that reason, sound data (analog signals) now are converted into digital signals so that the sound waves may be synthesized by an arithmetic operation.
In general, a game computer system uses a programmable sound generator (PSG), which is small in size and capacity. In the PSG, wave data supplied by a CPU are modulated in amplitude or frequency in order to generate a sound wave. The PSG may generate simple waves to intentionally produce noise. According to the PSG, it is easy to control the output sound; however, it is difficult to generate a variety of sounds.
In order to realize A/D conversion, a pulse code modulation (PCM) method is used, by which an analog signal is sampled at predetermined intervals, the sampled data are quantized, and then, are transformed into binary data.
In another way, a difference PCM (DPCM) method, the difference of the next two sampled data is quantized so that the amount of output data to be transmitted is reduced. Further, according to an adaptive difference PCM (ADPCM) method, the quantizing process is performed at a short pitch when the next two sampled data have a great difference, and on the other hand, the process is performed at a long pitch when they have a small difference. As a result, the output data may be more compressed.
The PCM and ADPCM data are compatible with each other by compression and extension processing, the processing being performed based on two kinds of conversion between scale value and scale level, and among the ADPCM data, the changing amount and changing level of the data.
In a game computer, ADPCM sound data stored in an extra recording device are read by a CPU, and the data are extended by an ADPCM decoder in accordance with scale value and scale level to reproduce the original sound. The ADPCM decoder contains a synchronizing signal generating circuit, which generates a transmission rate, according to which the PCM data are reproduced, by using a crystal resonator.
Recently, a game computer has not only sound sources such as PSG and ADPCM controlled by the CPU, but also an external audio device to realize high quality sound reproduction. For example, in a game computer using a CD (compact disk) as a recording medium, a CD player is directly used as the PCM sound source.
In such a game computer system, it is desirable to reproduce sound data in synchronization with each other to display image data. In a conventional system, the sound data are reproduced in synchronization with their own synchronizing signal generated in the ADPCM decoder, and the image data are displayed in synchronization with vertical synchronizing signals.
The CPU controls the outputs of the sound and image data to be synchronized in accordance with the sound synchronizing signal and vertical synchronizing signal. For example, sound is reproduced in synchronization with an image for each data set, that is, the image starts to be displayed when the first data of the sound data set start being reproduced. However, a time gap of outputs between the sound and image data grows gradually with progression to the end of the sound data set.
The CPU resets the ADPCM decoder to initialize the scale level and PCM value. If the ADPCM data are not transmitted accidentally or some tables occur in the transmission, the scale level and PCM value may go out of order. As a result, it becomes difficult to reproduce the sound normally, unless the ADPCM data are reset to start reproducing again. Even if the ADPCM data are reset, sound data may not be reproduced in the middle, that is, the sound data must be reproduced again from the start.
As another way, the ADPCM data are checked whether they are transmitted normally, and when some tables occur in the transmission, operation for reading ADPCM data is repeated until normal data may be read. According to this processing, which is called a "retry function," however, it takes long time to restore to the normal condition.
Generally, image data occupy an area larger than that of sound data in a memory. A variety of sound sources are used in order to realize high quality sound reproduction with a small amount of data. When a CD is employed as a sound storage medium, the PSG, ADPCM or PCM decoder is used as a sound source. The PSG decoder reproduces waveform sound, effect sound and the like. The ADPCM decoder reproduces complicated natural sound, human voice and the like. The PCM decoder reproduces sound that is not necessary to be controlled in timing. According to the ADPCM decoder, it is difficult to realize high quality sound reproduction.
In the ADPCM decoder, ADPCM data are calculated by omitting the figures after the decimal point in order to reproduce the original sound. This omission causes an error in the scale level and PCM value, which are used in the reproducing process, and therefore, the original sound may not be reproduced normally. The reproducing error is accumulated when a large amount of ADPCM data are treated.
In the game computer system, it is required to change the sampling frequency (reproducing rate) as needed.